const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  // 直接关闭eslint检查
  // lintOnSave: false,
  devServer: {
    // 配置项目启动后自动打开浏览器
    open: true,
    host: "127.0.0.1",
    port: 8888,
    // proxy: 'http://gmall-h5-api.atguigu.cn/',
    proxy: {
      '/api1': {
        target: 'http://gmall-h5-api.atguigu.cn/',
        changeOrigin: true,
        pathRewrite: {
          '^/api1': ''
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        "@assets": "@/assets",
        "@comp": "@/components",
        "@pages": "@/pages",
      },
    },
  },
})
